#ifndef __RTC_H
#define __RTC_H
#include "sys.h"
#include "delay.h"
#include <time.h> //引入keil编译器时间库函数
typedef struct    // 日期时间结构体
{
    uint16_t year;
    uint8_t month;
    uint8_t day;
    uint8_t hour;
    uint8_t min;
    uint8_t sec;
    uint8_t week;

} RTC_DateTypeDef;

extern RTC_DateTypeDef RTC_DateStructure;

void RTC_Config(void);
void RTC_First_Config(void);

uint8_t RTC_SetDateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec);
uint8_t RTC_GetDateTime(void);
uint8_t RTC_GetWeek(uint16_t year, uint8_t month, uint8_t day);
void RTC_TestCode(void);

#endif
